package practice1_100;

public class Practice231 {
    public boolean isPowerOfTwo(int n) {

        for(int x=n;x!=1;){
            if(x%2==1&&x!=1){
                return false;
            }
            else x=x/2;
        }
        return true;
    }

    public static void main(String[] args) {
       boolean a= new Practice231().isPowerOfTwo(18);
        System.out.println(a);
    }


}
